sso.tsx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { useParams } from 'common'
  2. import {
  3. PageHeader,
  4. PageHeaderDescription,
  5. PageHeaderMeta,
  6. PageHeaderSummary,
  7. PageHeaderTitle,
  8. } from 'ui-patterns/PageHeader'
  9. import { SSOConfig } from '@/components/interfaces/Organization/SSO/SSOConfig'
  10. import { DefaultLayout } from '@/components/layouts/DefaultLayout'
  11. import OrganizationLayout from '@/components/layouts/OrganizationLayout'
  12. import { OrganizationSettingsLayout } from '@/components/layouts/ProjectLayout/OrganizationSettingsLayout'
  13. import { UnknownInterface } from '@/components/ui/UnknownInterface'
  14. import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
  15. import type { NextPageWithLayout } from '@/types'
  16. const OrgSSO: NextPageWithLayout = () => {
  17. const { slug } = useParams()
  18. const showSsoSettings = useIsFeatureEnabled('organization:show_sso_settings')
  19. if (!showSsoSettings) {
  20. return <UnknownInterface urlBack={`/org/${slug}/general`} />
  21. }
  22. return (
  23. <>
  24. <PageHeader size="small">
  25. <PageHeaderMeta>
  26. <PageHeaderSummary>
  27. <PageHeaderTitle>Single Sign-On</PageHeaderTitle>
  28. <PageHeaderDescription>
  29. SAML SSO configuration and domain access controls
  30. </PageHeaderDescription>
  31. </PageHeaderSummary>
  32. </PageHeaderMeta>
  33. </PageHeader>
  34. <SSOConfig />
  35. </>
  36. )
  37. }
  38. OrgSSO.getLayout = (page) => (
  39. <DefaultLayout>
  40. <OrganizationLayout title="SSO">
  41. <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
  42. </OrganizationLayout>
  43. </DefaultLayout>
  44. )
  45. export default OrgSSO